<?	
	session_start();//gọi một phiên làm việc			
	require_once("model/lang_vn.php");
	
	$m = array();//định nghĩa các mức menu
	$m[0] = isset($_REQUEST['cc'])? $_REQUEST['cc'] : null;
	$m[1] = isset($_REQUEST['m1'])? $_REQUEST['m1'] : null;
	$m[2] = isset($_REQUEST['m2'])? $_REQUEST['m2'] : null;
	$m[3] = isset($_REQUEST['m3'])? $_REQUEST['m3'] : null;
	$m[4] = isset($_REQUEST['m4'])? $_REQUEST['m4'] : null;
	if(!isset($_SESSION['hd308']) || $_SESSION['hd308']==""){		
		$session = date("dHis");
		$_SESSION['hd308'] = $session;
	}
		
	// nếu menu nhiều mức thì thêm vào m[n]	
	require("model/config.php");
	require("model/sql.class.php");
	require("view/pub.class.php");
	$sql=new sql();
	$pub=new pub();
	$sql->CONNECT_DB(HOST,USER,PASS,DB);	
	$tg=time();
	$tgout=900;
	$tgnew=$tg - $tgout;
	$uo_ip = $_SERVER['REMOTE_ADDR'];
	$uo_local = $_SERVER['PHP_SELF'];
	$pub->visiter();	
	$resultdel = $_SESSION['hd308']-10000000;
	$mresult = mysql_query("DELETE FROM movie_tpm WHERE tpm_session<=".$resultdel."");
	$query=mysql_query("insert into useronline(tgtmp,date,ip,local) values(".$tg.",'".date("Y-m-d")."','".$uo_ip."','".$uo_local."')");
	if(!isset($_SESSION['showDialog']) || $_SESSION['showDialog']==""){
		$_SESSION['showDialog'] = '1';
	}else{
		$_SESSION['showDialog'] = '2';
	}	
?>	

<!-- Update your html tag to include the itemscope and itemtype attributes -->
<html itemscope itemtype="http://schema.org/Product">
<head>
<!-- Add the following three tags inside head -->
<meta itemprop="name" content="HD chon loc">
<meta itemprop="description" content="chép phim hd, chep phim, phimgiare, phim hd, chep phim hd hcm, chepphimhd, chep phim 3d, chepphimgiare, chep phim gia re, chép phim hd, hd chon loc, phim hd, chep phim hd, chep phim 3d, chep phim, chép phim, copy phim, phim, hd, o cung, xem phim hd, down phim hd, list phim, phim tam ly, phim, dau phat 3d, dau phat hd, dau phat 3d tot nhat, dau phat hd tot nhat">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="google-site-verification" content="PdGI4Lb4Zv5j-iQk0zuxouylQxwskt1APQOtWV1zPHs" />
<title>HD Chon loc</title>

<link href="image/common/logoweb.ico" rel="icon">

<link rel="stylesheet" type="text/css" href="css/common.css">
<link rel="stylesheet" type="text/css" href="css/nivo-slider.css">
<link rel="stylesheet"type="text/css" href="css/colorbox.css" />
<link rel="stylesheet"type="text/css" href="css/style.css" />
<link rel="stylesheet"type="text/css" href="css/ddsmoothmenu.css" />

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/js.js"></script>
<script type="text/javascript" src="js/jquery.colorbox.js"></script>
<!-- <script src="js/mmenu.js" type="text/javascript"></script> -->
<!-- <script src="js/menuItems.js" type="text/javascript"></script> -->
<script src="js/ddsmoothmenu.js" type="text/javascript"></script>
</head>
<body>
<div id="fb-root"></div>


<script type="application/javascript">
ddsmoothmenu.init({
	mainmenuid: "smoothmenu1", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
});

$(document).ready(function(){	
	$("#banggia").colorbox();
	$("#hdplayer").colorbox();
	
	$("#internal_hdd").colorbox({width:730,height:600});
	$("#quan1").colorbox();
	$("#quangv").colorbox();
	$("#quan12").colorbox();
	$("#welcom").colorbox();
	if($.trim($('#showDialog').val()) == '1'){		
		//$("#welcom").click();		
	}
	$("#lienHe").attr('href','javascript:showAddressDialog()');	

	$('#followEmail').focusin(function(){
		$(this).val('');
	});
	console.debug($('.shopping'));
	
});
function showAddressDialog(){
	$(".inline").colorbox({inline:true, width:"650",height:'550'});
	$(".inline").click();			
}
function showBangGia(){
	$('#banggia').click();
}
function showHDPlayer(){
	$('#hdplayer').click();
}
function showHDD(){
	$('#internal_hdd').click();
}
function showQuan1(){
	$('#quan1').click();
}
function showQuanGV(){
	$('#quangv').click();
}
function showQuan12(){
	$('#quan12').click();
}
//Get position X for shopping cart panel
function getPositionX(){
	var leftPage = document.body.clientWidth;
	var pos = (leftPage/2) - (940/2) - 160;	
	if(pos<10){
		pos = 10;
	}
	return pos;
}
</script>
<input type='hidden' value='<?php echo $_SESSION['showDialog']?>' id='showDialog'/>
<div style='display:none'>
	<a id='hdplayer' href="hdplayer.html" title="Đầu HD chính hảng, giá tốt (bảo hành 12 tháng) - Call: 0166.4.072.179">Thiết bị phát HD</a>
    <a id='internal_hdd' href="internal_hdd.html" title="Western digital chính hãng, giá tốt - Call 0166.4.072.179">HDD</a>
    <a id='banggia' href="image/bangia.png" title="Chép lại miễn phí khi xảy ra sự cố - Call: 0166.4.072.179">Bảng giá chép phim</a>
    <a id='quan1' href="address_quan1.html" title="Liên Hệ">Quận 1</a>	
    <a id='quangv' href="address_quangv.html" title="Liên Hệ">Quận GV</a>
    <a id='quan12' href="address_quan12.html" title="Liên Hệ">Quận 12</a>
</div>

<?	
require("templates/header.html");	//gọi file header.html
$file = isset($m[0]) ? $m[0] : 'movie';// nếu m[0]="" thì hiển thị trang default ngược lại thì hiển thị trang khác.
require "controllers/".$file.".php";// gọi file trong thư mục controller
require "templates/".$file.".html";//gọi file trong thư mục templates
require "templates/footer.html";	
?>
</body>
</html>